package gonz.common;

import org.apache.log4j.Logger;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class Clicker {
    public static final Logger log = Logger.getLogger(Clicker.class);
    public static final long waitInterval = 10;//sec

    public static WebElement waitAndClick(WebDriver webDriver, final By by) {
        WebElement webElement = Finder.waitAndFindElement(webDriver, by);
        webElement.click();
        log.debug(by + "  has been clicked.");
        return webElement;
    }
}
